package com.collect.senegal.zhiAdater.zhiTestWifiList;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.collect.senegal.R;

public class ZHITestWifiConnectAdjuster extends BaseQuickAdapter<ZHIWifiEntity, BaseViewHolder> {

    public ZHITestWifiConnectAdjuster() {
        super(R.layout.item_wifi_connect_list, null);
    }

    @Override
    protected void convert(BaseViewHolder helper, ZHIWifiEntity item) {
        String gstate = "";
        if (item.getState() == 0) {
            gstate = "Connecting";
        } else if (item.getState() == 1) {
            gstate = "Success";
        } else if (item.getState() == -1) {
            gstate = "Fail";
        } else if (item.getState() == -2) {
            gstate = "Not Found";
        }
        helper.setText(R.id.tv_wf_name, item.getName());
        helper.setText(R.id.tv_wf_state, gstate);
    }
}
